package com.sumer.psychology.blog.application.command;

import com.sumer.psychology.common.domain.model.Author;
import com.sumer.psychology.common.port.adapter.service.AuthorCommand;

/**
 * User: zhenguang.zhu
 * Date: 2014/9/3
 * Time: 9:00
 */
public class CreateCategoryCommand implements AuthorCommand {
    private static final String OTHER = "其他";

    private Author author;
    private String categoryName;

    public CreateCategoryCommand(Author author, String categoryName) {
        this.author = author;
        this.categoryName = categoryName;
    }

    public CreateCategoryCommand(Author author) {
        this.author = author;
        this.categoryName = OTHER;
    }

    @Override
    public void setAuthor(Author author) {
        this.author = author;
    }

    @Override
    public Author author() {
        return author;
    }

    public String categoryName() {
        return categoryName;
    }
}
